package com.zys.exercise;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class text1 {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress address = InetAddress.getByName("192.168.249.169");
        System.out.println(address);
        //获取电脑主机名
        System.out.println(address.getHostName());
    }
}
